<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-2"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- Module      :  Distribution.Compat.DList</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- Copyright   :  (c) Ben Gamari 2015-2019</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- License     :  BSD3</span><span>
</span><span id="line-6"></span><span class="hs-comment">--</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Maintainer  :  cabal-dev@haskell.org</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- Stability   :  experimental</span><span>
</span><span id="line-9"></span><span class="hs-comment">-- Portability :  portable</span><span>
</span><span id="line-10"></span><span class="hs-comment">--</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- A very simple difference list.</span><span>
</span><span id="line-12"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Compat.DList</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-13"></span><span>    </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier">DList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>    </span><span class="annot"><a href="Distribution.Compat.DList.html#runDList"><span class="hs-identifier">runDList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span>    </span><span class="annot"><a href="Distribution.Compat.DList.html#empty"><span class="hs-identifier">empty</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-16"></span><span>    </span><span class="annot"><a href="Distribution.Compat.DList.html#singleton"><span class="hs-identifier">singleton</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-17"></span><span>    </span><span class="annot"><a href="Distribution.Compat.DList.html#fromList"><span class="hs-identifier">fromList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-18"></span><span>    </span><span class="annot"><a href="Distribution.Compat.DList.html#toList"><span class="hs-identifier">toList</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-19"></span><span>    </span><span class="annot"><a href="Distribution.Compat.DList.html#snoc"><span class="hs-identifier">snoc</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-20"></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Foldable.html#toList"><span class="hs-identifier">toList</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#empty"><span class="hs-identifier">empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-comment">-- | Difference list.</span><span>
</span><span id="line-26"></span><span class="hs-keyword">newtype</span><span> </span><span id="DList"><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-var">DList</span></a></span></span><span> </span><span id="local-6989586621679624760"><span class="annot"><a href="#local-6989586621679624760"><span class="hs-identifier hs-type">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="DList"><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-var">DList</span></a></span></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679624760"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679624760"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span>
</span><span id="line-28"></span><span id="local-6989586621679624765"><span class="annot"><a href="Distribution.Compat.DList.html#runDList"><span class="hs-identifier hs-type">runDList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679624765"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679624765"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-29"></span><span id="runDList"><span class="annot"><span class="annottext">runDList :: forall a. DList a -&gt; [a]
</span><a href="Distribution.Compat.DList.html#runDList"><span class="hs-identifier hs-var hs-var">runDList</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span id="local-6989586621679624725"><span class="annot"><span class="annottext">[a] -&gt; [a]
</span><a href="#local-6989586621679624725"><span class="hs-identifier hs-var">run</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a]
</span><a href="#local-6989586621679624725"><span class="hs-identifier hs-var">run</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-30"></span><span>
</span><span id="line-31"></span><span class="hs-comment">-- | Make 'DList' with containing single element.</span><span>
</span><span id="line-32"></span><span id="local-6989586621679624762"><span class="annot"><a href="Distribution.Compat.DList.html#singleton"><span class="hs-identifier hs-type">singleton</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679624762"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679624762"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-33"></span><span id="singleton"><span class="annot"><span class="annottext">singleton :: forall a. a -&gt; DList a
</span><a href="Distribution.Compat.DList.html#singleton"><span class="hs-identifier hs-var hs-var">singleton</span></a></span></span><span> </span><span id="local-6989586621679624724"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679624724"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [a]) -&gt; DList a
forall a. ([a] -&gt; [a]) -&gt; DList a
</span><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-var">DList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679624724"><span class="hs-identifier hs-var">a</span></a></span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span class="hs-special">)</span><span>
</span><span id="line-34"></span><span>
</span><span id="line-35"></span><span class="hs-comment">-- | @since 3.4.0.0</span><span>
</span><span id="line-36"></span><span id="local-6989586621679624759"><span class="annot"><a href="Distribution.Compat.DList.html#empty"><span class="hs-identifier hs-type">empty</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679624759"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-37"></span><span id="empty"><span class="annot"><span class="annottext">empty :: forall a. DList a
</span><a href="Distribution.Compat.DList.html#empty"><span class="hs-identifier hs-var hs-var">empty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [a]) -&gt; DList a
forall a. ([a] -&gt; [a]) -&gt; DList a
</span><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-var">DList</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a]
forall a. a -&gt; a
</span><a href="../../base/src/GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span id="local-6989586621679624756"><span class="annot"><a href="Distribution.Compat.DList.html#fromList"><span class="hs-identifier hs-type">fromList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679624756"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679624756"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-40"></span><span id="fromList"><span class="annot"><span class="annottext">fromList :: forall a. [a] -&gt; DList a
</span><a href="Distribution.Compat.DList.html#fromList"><span class="hs-identifier hs-var hs-var">fromList</span></a></span></span><span> </span><span id="local-6989586621679624722"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679624722"><span class="hs-keyword hs-var">as</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [a]) -&gt; DList a
forall a. ([a] -&gt; [a]) -&gt; DList a
</span><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-var">DList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679624722"><span class="hs-keyword hs-var">as</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a] -&gt; [a]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-41"></span><span>
</span><span id="line-42"></span><span id="local-6989586621679624721"><span class="annot"><a href="Distribution.Compat.DList.html#toList"><span class="hs-identifier hs-type">toList</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679624721"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679624721"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-43"></span><span id="toList"><span class="annot"><span class="annottext">toList :: forall a. DList a -&gt; [a]
</span><a href="Distribution.Compat.DList.html#toList"><span class="hs-identifier hs-var hs-var">toList</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DList a -&gt; [a]
forall a. DList a -&gt; [a]
</span><a href="Distribution.Compat.DList.html#runDList"><span class="hs-identifier hs-var">runDList</span></a></span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span id="local-6989586621679624752"><span class="annot"><a href="Distribution.Compat.DList.html#snoc"><span class="hs-identifier hs-type">snoc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679624752"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679624752"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679624752"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-46"></span><span id="snoc"><span class="annot"><span class="annottext">snoc :: forall a. DList a -&gt; a -&gt; DList a
</span><a href="Distribution.Compat.DList.html#snoc"><span class="hs-identifier hs-var hs-var">snoc</span></a></span></span><span> </span><span id="local-6989586621679624719"><span class="annot"><span class="annottext">DList a
</span><a href="#local-6989586621679624719"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span id="local-6989586621679624718"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679624718"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DList a
</span><a href="#local-6989586621679624719"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">DList a -&gt; DList a -&gt; DList a
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">&lt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; DList a
forall a. a -&gt; DList a
</span><a href="Distribution.Compat.DList.html#singleton"><span class="hs-identifier hs-var">singleton</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679624718"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-47"></span><span>
</span><span id="line-48"></span><span id="local-6989586621679624747"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679624712"><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679624747"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-49"></span><span>  </span><span id="local-6989586621679624710"><span class="annot"><span class="annottext">mempty :: DList a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var hs-var hs-var hs-var">mempty</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DList a
forall a. DList a
</span><a href="Distribution.Compat.DList.html#empty"><span class="hs-identifier hs-var">empty</span></a></span><span>
</span><span id="line-50"></span><span>  </span><span id="local-6989586621679624708"><span class="annot"><span class="annottext">mappend :: DList a -&gt; DList a -&gt; DList a
</span><a href="../../base/src/GHC.Base.html#mappend"><span class="hs-identifier hs-var hs-var hs-var hs-var">mappend</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">DList a -&gt; DList a -&gt; DList a
forall a. Semigroup a =&gt; a -&gt; a -&gt; a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var">(&lt;&gt;)</span></a></span></span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span id="local-6989586621679624750"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679624703"><span id="local-6989586621679624705"><span class="annot"><a href="../../base/src/GHC.Base.html#Semigroup"><span class="hs-identifier hs-type">Semigroup</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679624750"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-53"></span><span>  </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span id="local-6989586621679624701"><span class="annot"><span class="annottext">[a] -&gt; [a]
</span><a href="#local-6989586621679624701"><span class="hs-identifier hs-var">a</span></a></span></span><span> </span><span id="local-6989586621679624700"><span class="annot"><span class="annottext">&lt;&gt; :: DList a -&gt; DList a -&gt; DList a
</span><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;&gt;</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-type">DList</span></a></span><span> </span><span id="local-6989586621679624699"><span class="annot"><span class="annottext">[a] -&gt; [a]
</span><a href="#local-6989586621679624699"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [a]) -&gt; DList a
forall a. ([a] -&gt; [a]) -&gt; DList a
</span><a href="Distribution.Compat.DList.html#DList"><span class="hs-identifier hs-var">DList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[a] -&gt; [a]
</span><a href="#local-6989586621679624701"><span class="hs-identifier hs-var">a</span></a></span><span> </span><span class="annot"><span class="annottext">([a] -&gt; [a]) -&gt; ([a] -&gt; [a]) -&gt; [a] -&gt; [a]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[a] -&gt; [a]
</span><a href="#local-6989586621679624699"><span class="hs-identifier hs-var">b</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-54"></span></pre></body></html>